package only.my.railgunys.weapon;

import only.my.railgunys.bean.Character;
import only.my.railgunys.bean.Weapon;

/**
 * 护摩
 */
public class Homa extends Weapon {
    public int refineLevel;
    public Homa(int refineLevel){
        this.atk = 608D;
        this.subStatValue = 66.2;
        this.refineLevel = refineLevel;
        this.name = "护摩";
        this.code = 6;
    }

    @Override
    public Character subStatEnhance(Character character) {
        character.addCritDmg(subStatValue);
        return character;
    }

    @Override
    public Character specialAbility(Character character) {
        character.addHp(character.getHp()*0.2*(1+(refineLevel-1)*0.25));
        double totalHp = character.getHp() + character.getHp_ex();
        character.setAtk_ex(character.getAtk_ex()+totalHp * (0.018*(1+(refineLevel-1)*0.25)));
        return character;
    }
}
